package com.yuanqi.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import lombok.Data;

/**
 * 收款记录表
 * @TableName receipt_record
 */
@TableName(value ="receipt_record")
@Data
public class ReceiptRecord implements Serializable {
    /**
     * 主键
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 关联收款单ID
     */
    private Long receiptId;

    /**
     * 关联销售订单ID（收款来源）
     */
    private Long soId;

    /**
     * 本次收款金额
     */
    private BigDecimal receiptAmount;

    /**
     * 收款方式
     */
    private String receiptMethod;

    /**
     * 核销状态（0-未核销/1-已核销）
     */
    private Integer 核销状态;

    /**
     * 
     */
    private Date createTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        ReceiptRecord other = (ReceiptRecord) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getReceiptId() == null ? other.getReceiptId() == null : this.getReceiptId().equals(other.getReceiptId()))
            && (this.getSoId() == null ? other.getSoId() == null : this.getSoId().equals(other.getSoId()))
            && (this.getReceiptAmount() == null ? other.getReceiptAmount() == null : this.getReceiptAmount().equals(other.getReceiptAmount()))
            && (this.getReceiptMethod() == null ? other.getReceiptMethod() == null : this.getReceiptMethod().equals(other.getReceiptMethod()))
            && (this.get核销状态() == null ? other.get核销状态() == null : this.get核销状态().equals(other.get核销状态()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getReceiptId() == null) ? 0 : getReceiptId().hashCode());
        result = prime * result + ((getSoId() == null) ? 0 : getSoId().hashCode());
        result = prime * result + ((getReceiptAmount() == null) ? 0 : getReceiptAmount().hashCode());
        result = prime * result + ((getReceiptMethod() == null) ? 0 : getReceiptMethod().hashCode());
        result = prime * result + ((get核销状态() == null) ? 0 : get核销状态().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", receiptId=").append(receiptId);
        sb.append(", soId=").append(soId);
        sb.append(", receiptAmount=").append(receiptAmount);
        sb.append(", receiptMethod=").append(receiptMethod);
        sb.append(", 核销状态=").append(核销状态);
        sb.append(", createTime=").append(createTime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}